<!--
/**************************************************
* @(#)orderview.jsp
*
* Copyright (c) 2005 Hitrust Technology Inc.
* Developed by SDC, Hitrust.
* All Rights Reserved.
*
* Modify History:
*  v1.00, 2006/02/08, SimonyiPeng
*  1) first release
/**************************************************
-->
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="java.util.*"%>
<%@ page import="com.hitrust.gs.business.GSOrganizationProcessor"%>
<%@ include file="../../common.jsp" %>
<html>
<head>
<title>订单录入结果</title>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<LINK href="<%=root%>/css/caigouxitong.css" type=text/css rel=stylesheet>
<SCRIPT language="JavaScript" src="<%=root%>/js/common.js"></SCRIPT>
<SCRIPT language="JavaScript" src="<%=root%>/js/calendar.js"></SCRIPT>
<SCRIPT language="JavaScript" src="<%=root%>/js/string.js"></SCRIPT>

</head>

<%
String bcNum = (String)request.getParameter("balancecategory");
String bcName = "";
ArrayList bcList = GSBaseManager.getAllBalanceCategory();
//String[] ttStr = (String[])arylist.get(0);
for(int bcsize=0;bcsize<bcList.size();bcsize++){
    GSBalanceCategoryBean bcBean = (GSBalanceCategoryBean)bcList.get(bcsize);
    if(bcBean.getGs_balance_category_no().equals(bcNum)){
        bcName = bcBean.getGs_balance_category_name();
    }
}
System.out.println("bcNum="+bcNum);
%>

<script language='javascript'>

    //window.onblur=function(){window.close();}

    function loadparent(){

        //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        //申购单信息
        //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

        var deptid ;
        var parentdeptid = opener.document.getElementById("deptid");
        for(var i=0; i<parentdeptid.options.length; i++) {
                if(parentdeptid.options[i].selected ) {
                    deptid = parentdeptid.options[i].text;
                }
        }
        document.getElementById('dhdw').innerHTML = "<div align='left' class='txt_content' > "+ deptid +"</div>";
        if(opener.document.getElementById('delivermode').value == 104)
        {
            document.getElementById('psfs').innerHTML = "<div align='left' class='txt_content' > "+ opener.document.getElementById("delivermode_").value +"</div>";
        }
        else
        {
            document.getElementById('psfs').innerHTML = "<div align='left' class='txt_content' > <%=com.hitrust.gs.service.GSBaseManager.getDictioanryName(request.getParameter("delivermode"))%></div>";
        }
        
        if(opener.document.getElementById('balancemode').value == 205)
        {
            document.getElementById('jsfs').innerHTML = "<div align='left' class='txt_content' > "+ opener.document.getElementById("balancemode_").value +"</div>";
        }
        else
        {
            document.getElementById('jsfs').innerHTML = "<div align='left' class='txt_content' ><%=com.hitrust.gs.service.GSBaseManager.getDictioanryName(request.getParameter("balancemode"))%></div>";
        }
        var deliveraddr ;
        var parentdeliveraddr = opener.document.getElementById("deliveraddr");
        for(var i=0; i<parentdeliveraddr.options.length; i++) {
                if(parentdeliveraddr.options[i].selected ) {
                    deliveraddr = parentdeliveraddr.options[i].text;
                }
        }
        document.getElementById('shdz').innerHTML = "<div align='left' class='txt_content' > "+ deliveraddr +"</div>";
        document.getElementById('lxr').innerHTML = "<div align='left' class='txt_content' > "+ opener.document.getElementById("linkman_").value +"</div>";
        document.getElementById('lxdh').innerHTML = "<div align='left' class='txt_content' > "+ opener.document.getElementById("linktel_").value +"</div>";
        document.getElementById('remark').innerHTML = "<div align='left' class='txt_content' > "+ opener.document.getElementById("Textarea1").value +"</div>";
        document.getElementById('cjr').innerHTML = "<div align='left' class='txt_content' > "+ '<%=((GSOperatorBean)(session.getAttribute(GSBaseConstants.LOGIN))).getGs_oper_name()%>' +"</div>";
        //document.getElementById('balancecategory').innerHTML = "<div align='left' class='txt_content' > "+ opener.document.getElementById("bcName").value +"</div>";      

        //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        //申购单明细信息
        //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        for(i=1;i<=<%=Integer.parseInt(GSBaseConstants.tPage)%>;i++){
            if(opener.document.getElementById("concentricityid"+i).value != ""){
                document.getElementById("concentricityid"+i).innerHTML = "<div align='center' class='txt_content' > "+ opener.document.getElementById("concentricityid"+i).value +"</div>";
                document.getElementById("manufacturename"+i).innerHTML = "<div align='center' class='txt_content'><a href='<%=response.encodeURL(root+"/A150103.do")%>?concentricityId="+opener.document.getElementById("concentricityid"+i).value+"' target='_blank'>"+opener.document.getElementById("manufacturename_"+i).value+"</a></div>";
                document.getElementById("spec"+i).innerHTML = "<div align='center' class='txt_content' > "+ opener.document.getElementById("manufacturespec_"+i).value +"</div>";
                document.getElementById("type"+i).innerHTML = "<div align='center' class='txt_content' > "+ opener.document.getElementById("manufacturetype_"+i).value +"</div>";
                document.getElementById("brand"+i).innerHTML = "<div align='center' class='txt_content' > "+ opener.document.getElementById("manufacturebrand_"+i).value +"</div>";
                document.getElementById("referenceprice"+i).innerHTML = "<div align='center' class='txt_content' > "+ opener.document.getElementById("manufactureunitprice_"+i).value +"</div>";
                document.getElementById("ordercount"+i).innerHTML = "<div align='center' class='txt_content' > "+ opener.document.getElementById("ordercount"+i).value +"</div>";
                document.getElementById("quantunit"+i).innerHTML = "<div align='center' class='txt_content' > "+ opener.document.getElementById("manufacturequantunit_"+i).value +"</div>";
                document.getElementById("deliverdate"+i).innerHTML = "<div align='center' class='txt_content' > "+ opener.document.getElementById("deliverdate"+i).value +"</div>";
                document.getElementById("period"+i).innerHTML = "<div align='center' class='txt_content' > "+ opener.document.getElementById("period_"+i).value +"</div>";              
                var delivertimeValue = opener.document.getElementById("delivertime"+i).value;
                var delivertimeText = '';
                if(delivertimeValue == "1"){
                    delivertimeText = "8:00-12:00";
                }
                if(delivertimeValue == "2"){
                    delivertimeText = "13:00-18:00";
                }
                if(delivertimeValue == "3"){
                    delivertimeText = "全天";
                }
                document.getElementById("delivertime"+i).innerHTML = "<div align='center' class='txt_content' > "+ delivertimeText +"</div>";
                document.getElementById("divmode"+i).innerHTML = "<div align='center' class='txt_content' > "+ opener.document.getElementById("divmode"+i).innerText +"</div>";
            }
        }

    }   
</script>

<body   BGCOLOR='#f5f5f5' LEFTMARGIN='0' TOPMARGIN='0' MARGINWIDTH='0' MARGINHEIGHT='0'  onload='loadparent();'>

<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td height="20"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
        <tr height="20">
          <td height="20" width="1" class="mtxt_black">&nbsp;</td>
          <td height="30" width="758" class="mtxt_black">订单录入结果</td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td class="bg_line" height="2"></td>
  </tr>
</table>

<br>


<form name="form1" id="form1" method="post"  style="visibility: visible;">
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr> 
        <td> 
            <table class=bg_table id=tableId    cellspacing=1 cellpadding=2 width=100% align=center border=0>
                <tbody> 
                <tr class="bg_column" height=20> 
                        <td align=middle colspan="11">订单总体信息</td>
                </tr>
                <tr class="bg_row_odd" height=20> 
                    <td class=top align=middle width='20%' >
                        <div align="center" class="txt_content">订单编号</div>
                    </td>
                    <td class=top align=middle id='sgdbh'> 
                        <div align="left" class="txt_content" > 
                        
                        </div>
                    </td>
                    <td class=top align=middle colspan=4 id='zjsptg'> 
                        <div align="center" class="txt_content">
                        
                        </div>
                    </td>
                </tr>
                
                <tr class="bg_row_odd" height=20> 
                    <td class=top align=middle> 
                        <div align="center" class="txt_content">订货单位</div>
                    </td>
                    <td class=top align=center id='dhdw'> 
                        <div align='left' class='txt_content'> 
                        </div>
                    </td>
                    <td class=top align=left> 
                        <div align="center" class="txt_content">配送方式</div>
                    </td>
                    <td class=top align=middle id='psfs'> 
                        <div align='left' class='txt_content'> 
                        </div>
                    </td>
                    <td class=top align=middle> 
                        <div align="center" class="txt_content">结算方式</div>
                    </td>
                    <td class=top align=middle id='jsfs'> 
                        <div align='left' class='txt_content'> 
                        </div>
                    </td>
                </tr>
                <tr class="bg_row_odd" height=20> 
                    <td class=top align=middle> 
                        <div align="center" class="txt_content">送货地址</div>
                    </td>
                    <td class=top align=middle id='shdz'>  
                        <div align='left' class='txt_content'> 
                        </div>
                    </td>
                    <td class=top align=middle> 
                        <div align="center" class="txt_content">联系人</div>
                    </td>
                    
                    <td class=top align=middle id='lxr'> 
                        <div align='left' class='txt_content'> 

                        </div>
                    </td>
                    <td class=top align=middle> 
                        <div align="center" class="txt_content">联系电话</div>
                    </td>
                    
                    <td class=top align=middle id='lxdh'> 
                        <div align='left' class='txt_content'> 

                        </div>
                    </td>                
                </tr>
                
                <tr class="bg_row_odd" height=20> 
                    <td class=top align=middle> 
                        <div align="center" class="txt_content">结算分类</div>
                    </td>
                    <td class=top align=middle colspan='5' id='balancecategory'> 
                        <div align="left" class="txt_content"> <%=bcName%>
                        </div>
                    </td>
                </tr>
                <tr class="bg_row_odd" height=20> 
                    <td class=top align=middle> 
                        <div align="center" class="txt_content">备注</div>
                    </td>
                    <td class=top align=middle colspan='5' id='remark'> 
                        <div align="left" class="txt_content"> 
                        </div>
                    </td>
                </tr>
                <tr class="bg_row_odd" height=20> 
                    <td class=top align=middle> 
                        <div align="center" class="txt_content">创建人</div>
                    </td>
                    <td class=top align=middle id='cjr'> 
                        <div align='left' class='txt_content'> 
                        </div>
                    </td>
                    <td class=top align=middle> 
                        <div align="center" class="txt_content">创建时间</div>
                    </td>
                    
                    <td class=top align=middle colspan=3 id='cjsj'> 
                        <div align='left' class='txt_content'> 

                        </div>
                    </td>
                </tr>                
                </tbody> 
            </table>
        </td>
    </tr>
</table>

<center>



    <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr>
            <td width=60% align=left>
                <br>
            </td>
        <tr>
    </table>


    <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
        <input type='hidden' id='currentrownum' name='currentrownum' value='1'>
        <tr> 
            <td> 
                <table class=bg_table id=tableId    cellspacing=1 cellpadding=2 width=100% align=center border=0>
                    <tbody> 
                    <tr class="bg_column" height=20> 
                        <td align=middle colspan="12">订单产品输入</td>
                    </tr>
                    
                    <tr class="bg_column" height=20> 
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 集中编码</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 产品名称</div>
                        </td>                        
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 规格</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 型号</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 品牌</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 质保期</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 价格（元）</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 订货数量</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 单位</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 送货日期</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 送货时间</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 结算模式</div>
                        </td>
                    </tr>
                     <%
                     for(int line=1;line<=Integer.parseInt(GSBaseConstants.tPage);line++){
                     %>

                    <tr id='tr<%=line %>>' class="bg_row_even" height=20 > 
                        <!--集中编码-->
                        <td class=top align=middle nowrap id='concentricityid<%=line %>'>                         
                            <div align="center" class="txt_content"> 
                            </div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap id='manufacturename<%=line %>'>                         
                            <div align="center" class="txt_content" > 
                            </div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap id="spec<%=line %>" >                         
                            <div align="center" class="txt_content"> 
                            </div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap id="type<%=line %>" >                         
                            <div align="center" class="txt_content"> 
                            </div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap id="brand<%=line %>" >                         
                            <div align="center" class="txt_content"> 
                            </div>
                        </td>
                        <!--质保期-->
                        <td class=top align=middle nowrap id="period<%=line %>" >                         
                            <div align="center" class="txt_content"> 
                            </div>
                        </td>
                        <!--参考价格-->
                        <td class=top align=middle nowrap id="referenceprice<%=line %>" >                      
                            <div align="center" class="txt_content"> 
                            </div>
                        </td>
                        <!--订货数量-->
                        <td class=top align=middle id='ordercount<%=line %>'> 
                            <div align="center" class="txt_content"> 
                            </div>
                        </td>
                        <!--单位-->
                        <td class=top align=middle nowrap id="quantunit<%=line %>" >                         
                            <div align="center" class="txt_content"> 
                            </div>
                        </td>                        
                        <!--送货日期-->
                        <td class=top align=middle nowrap id='deliverdate<%=line %>'> 
                            <div align="center" class="txt_content">                                
                            </div>
                        </td>
                        <!--送货时间-->
                        <td class=top align=middle id='delivertime<%=line %>'> 
                            <div align='center' class='txt_content'> 
                            </div>
                        </td>
                        <!--结算模式-->
                        <td class=top align=middle id='divmode<%=line %>'> 
                            <div align='center' class='txt_content'> 
                            </div>
                        </td>
                    </tr>
                    <%} %>

                    
                    </tbody> 
                </table>
            </td>
        </tr>
    </table>





    <p align="center">  
        <input type="button" class="kuang" width="58" height="24" value="保存" onclick="parentsave();">
        <input type="button" class="kuang" width="58" height="24" value="返回" onclick="window.close();">
    </p>
</form>


<div style="text-align:center;visibility:hidden" id="queding" name="queding">
       <input type="image" src="images/cx.jpg" width="58" height="24" class="box" onclick="form1.submit()">
</div>
</center>

<script language='javascript'>
function parentsave(){
    opener.document.all.middleview.value='T';
    opener.location="javascript:middleviewsubmit('"+'<%=request.getParameter("val")%>'+"')";
    window.close();
}
</script>

</body>
</html>